package com.zhilianbao.leyaogo.model.response.address;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Author: hcy
 * Description:收货地址
 * Created: 2016/11/18 15:55
 */
public class Address implements Parcelable{

    private long userId;
    private long supplierId;
    private long addressId;//地址id
    private int isDefault;//是否默认 0否1是
    private int adType;//(integer, optional): 地址类型 0 公司 1 家庭 2 亲属 3 其他 ,
    private String adTypeNote;// (string, optional): 地址类型备注 ,
    private String adName;//(string, optional): 收货人名 ,
    private String adPhone;// (string, optional): 收货人联系方式 ,
    private String province;// (string, optional): 所属省 ,
    private String city;// (string, optional): 所属城市 ,
    private String area;// (string, optional): 所属地址 ,
    private String strAddress;// (string, optional): 详细地址 ,
    private String address;// (string, optional): 地址 ,
    private String zipCode;// (string, optional): 邮政编码 ,
    private String adJson;// (string, optional): 地址Json ,


    protected Address(Parcel in) {
        userId = in.readLong();
        supplierId = in.readLong();
        addressId = in.readLong();
        isDefault = in.readInt();
        adType = in.readInt();
        adTypeNote = in.readString();
        adName = in.readString();
        adPhone = in.readString();
        province = in.readString();
        city = in.readString();
        area = in.readString();
        strAddress = in.readString();
        address = in.readString();
        zipCode = in.readString();
        adJson = in.readString();
    }

    public static final Creator<Address> CREATOR = new Creator<Address>() {
        @Override
        public Address createFromParcel(Parcel in) {
            return new Address(in);
        }

        @Override
        public Address[] newArray(int size) {
            return new Address[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(userId);
        dest.writeLong(supplierId);
        dest.writeLong(addressId);
        dest.writeInt(isDefault);
        dest.writeInt(adType);
        dest.writeString(adTypeNote);
        dest.writeString(adName);
        dest.writeString(adPhone);
        dest.writeString(province);
        dest.writeString(city);
        dest.writeString(area);
        dest.writeString(strAddress);
        dest.writeString(address);
        dest.writeString(zipCode);
        dest.writeString(adJson);
    }

    public String getAdJson() {
        return adJson;
    }

    public void setAdJson(String adJson) {
        this.adJson = adJson;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(long supplierId) {
        this.supplierId = supplierId;
    }

    public long getAddressId() {
        return addressId;
    }

    public void setAddressId(long addressId) {
        this.addressId = addressId;
    }

    public int getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(int isDefault) {
        this.isDefault = isDefault;
    }

    public int getAdType() {
        return adType;
    }

    public void setAdType(int adType) {
        this.adType = adType;
    }

    public String getAdTypeNote() {
        return adTypeNote;
    }

    public void setAdTypeNote(String adTypeNote) {
        this.adTypeNote = adTypeNote;
    }

    public String getAdName() {
        return adName;
    }

    public void setAdName(String adName) {
        this.adName = adName;
    }

    public String getAdPhone() {
        return adPhone;
    }

    public void setAdPhone(String adPhone) {
        this.adPhone = adPhone;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getStrAddress() {
        return strAddress;
    }

    public void setStrAddress(String strAddress) {
        this.strAddress = strAddress;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getZipCode() {
        return zipCode;
    }

    public void setZipCode(String zipCode) {
        this.zipCode = zipCode;
    }
}
